package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.util.Vector;
import javax.swing.ImageIcon;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;

import modelo.Mpartido;
import modelo.Mtemporada;
import modelo.TablaEquipos;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class calendariofV extends javax.swing.JFrame {
	private JPanel jpanelcalendario;
	private JTable jtablecalendario;
	private JButton btnsalir;
	private JScrollPane jScrollPanel;
	private calendarioModelo calendario;
	private Mtemporada mt;
//	private Vector<Mpartido> mpar= new Vector<Mpartido>();

	/**
	* Auto-generated main method to display this JFrame
	*/
		
	public calendariofV() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Calendario de Juegos");
			this.setIconImage(new ImageIcon(getClass().getClassLoader().getResource("imagen/Google-Calendar-48.png")).getImage());
			{
				jpanelcalendario = new JPanel();
				getContentPane().add(jpanelcalendario, BorderLayout.CENTER);
				jpanelcalendario.setLayout(null);
				jpanelcalendario.setBackground(new java.awt.Color(255,255,255));
				{
					jScrollPanel = new JScrollPane();
					jpanelcalendario.add(jScrollPanel);
					jScrollPanel.setBounds(12, 29, 421, 224);
					jScrollPanel.setBackground(new java.awt.Color(0,0,64));
					{
						
							
						
						jtablecalendario = new JTable();
						jScrollPanel.setViewportView(jtablecalendario);
						
					
					}
				}
				{
					btnsalir = new JButton();
					jpanelcalendario.add(btnsalir);
					btnsalir.setText("Salir");
					btnsalir.setBounds(291, 265, 130, 43);
					btnsalir.setBackground(new java.awt.Color(0,0,64));
					btnsalir.setForeground(new java.awt.Color(255,255,255));
					btnsalir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/Log-out-32.png")));
				}
			}
			pack();
			this.setSize(461, 357);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void setResultados(AbstractTableModel abstractTableModel) {
		jtablecalendario.setModel(abstractTableModel);
	}
	
	public void addListener(ActionListener actionListener){
		btnsalir.addActionListener(actionListener);
	}
}
